home *** CD-ROM | disk | FTP | other *** search
/ Champak 138 / Volume 138 Aug 19 2011 - Damaged.iso / Games / tobby_on_ice.swf / scripts / DefineSprite_128 / frame_1 / DoAction.as
Text File  |  2011-08-19  |  620b  |  35 lines

  1. function main()
  2. {
  3.    if(_root.pauseFlg)
  4.    {
  5.       return undefined;
  6.    }
  7.    if(this.stat === "stay")
  8.    {
  9.       this.stay();
  10.    }
  11. }
  12. function stay()
  13. {
  14.    var _loc2_ = this;
  15.    if(_loc2_.hitMC.hitTest(_root.tobbyMC.hitMC))
  16.    {
  17.       var _loc1_ = _root.tobbyMC.hitJelly();
  18.       if(_loc1_ == true)
  19.       {
  20.          trace("hit");
  21.          _loc2_.stat = "del";
  22.          _loc2_._visible = false;
  23.       }
  24.    }
  25. }
  26. function reset()
  27. {
  28.    var _loc1_ = this;
  29.    _loc1_.stat = "stay";
  30.    _loc1_._visible = true;
  31.    _loc1_.anmMC.gotoAndPlay("stay");
  32. }
  33. _root.jellyOnIceMC = this;
  34. this.stat = "stay";
  35.